<?php
namespace app\common\model;

class PaymentRequest extends TimeModel
{

   static function note($no,$accountId,$shoufu,$params){
            return (new static())->create([
                'out_trade_no'=>$no,
                'payment_account_id'=>$accountId,
                'shou_fu'=>$shoufu,
                'params'=>$params,
            ]);
        }

    static function updNotify($out_trade_no,$result){
        (new static())->where('out_trade_no',$out_trade_no)->save([
            'notify'=>json_encode($result)
        ]);
    }
    static function updResult($id,$result){
        (new static())->where('id',$id)->save([
                'result'=>$result
        ]);
   }

}